﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyLanguage.Model
{
    public class Dictionary
    {
        [Key]
        public int DictionaryId { get; set; }
        public string Name { get; set; }
        public DateTime DateCreated { get; set; }
        public DateTime DateChanged { get; set; }

        //Navigation Properties
        public virtual ICollection<Word> Words { get; set; }
        public virtual ICollection<Test> Tests { get; set; }

        //Defining many-to-many relationship
        public Dictionary()
        {
            Tests = new HashSet<Test>();
        }
    }
}
